// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env: "te-6b32b2"
})

const rp = require('request-promise')

const URL = 'http://musicapi.xiecheng.live/song/url?id='


// 云函数入口函数
exports.main = async (event, context) => {
  return await rp(URL + parseInt(event.musicId)).then((res) => {
    return JSON.parse(res)
  })
}